#include "typedef.h"
#include "systick.h"
uint16_t tick_1ms = 0;
uint32_t tick_10ms = 0;

void systick(void){
	tick_1ms++;
	if(tick_1ms % 10 == 0){
		tick_10ms++;
	}
}


uint32_t get_curr_ltime(void) {
    return tick_10ms;
}

void reset_ltime(uint32_t *time){
    *time = tick_10ms;
}

void reset_time(uint16_t *time){
    *time = tick_1ms;
}

bool_t is_ltime_out(uint32_t start_ltime, uint32_t interval_ltime){
    if((get_curr_ltime() - start_ltime) >= interval_ltime)
        return TRUE;
    else
        return FALSE;
}
